package com.qf.controller;


import com.qf.commons.TableData;
import com.qf.entity.Address;
import com.qf.service.AddressService;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@CrossOrigin("*")
@RequestMapping("/address")
@RestController
public class AddressController {
    private AddressService addressService;

    public AddressController(AddressService addressService) {
        this.addressService = addressService;
    }

    @GetMapping
    public Object QueryByIdAll(Integer offset,Integer limit,Integer uId){
        TableData<Address> tableData = addressService.QueryByIdAll(offset, limit, uId);
        return tableData;
    }
}
